A programmable logic controller (PLC) can utilize a memory device for storage. The memory device, which can be a memory cartridge, can be an electronically erasable programmable read only memory (EEPROM) device. The memory cartridge can be used to store configuration information for the PLC and/or data obtained by the PLC. Data obtained by the PLC can be stored in a log and/or database comprising a plurality of records.
Each record of the log can comprise a record type. The record type can be used by the PLC to locate and/or track the record that was added to the log last and/or a location where fields of a record will be populated next. Each time fields of a record are filled with new data, the record type of the record can be changed to show that it is a valid record but no longer the head of the log.
Initializing a data log can result in the transfer of a structure definition to the data log, but typically, no data is transferred to fill fields of records of the data log. Instead, at data log initialization, the PLC can set all record type fields in the data log to “invalid.” Setting all record type fields in the data log to invalid can require considerable amounts of time for a large log.